package gowcage.mvp.model;

/**
 * Created by Administrator on 2017/4/8.
 * Model 负责操作数据
 */

public class Model implements IModel {

    private String username;
    private String password;

    public Model(String username, String password) {
        this.username = username;
        this.password = password;
    }

    @Override
    public String getUsername() {
        return username;
    }

    @Override
    public String getPassword() {
        return password;
    }

    @Override
    public int checkUserValidity(String username, String password) {
        if (username == null || password == null || !username.equals(getUsername()) || !password.equals(getPassword())) {
            return -1;
        }
        return 0;
    }

}
